/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.androidpublisher.model;

/**
 * Request message for UpdateOneTimeProduct.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class UpdateOneTimeProductRequest extends com.google.api.client.json.GenericJson {

  /**
   * Optional. If set to true, and the one-time product with the given package_name and product_id
   * doesn't exist, the one-time product will be created. If a new one-time product is created,
   * update_mask is ignored.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean allowMissing;

  /**
   * Optional. The latency tolerance for the propagation of this product upsert. Defaults to
   * latency-sensitive.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String latencyTolerance;

  /**
   * Required. The one-time product to upsert.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private OneTimeProduct oneTimeProduct;

  /**
   * Required. The version of the available regions being used for the one-time product.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RegionsVersion regionsVersion;

  /**
   * Required. The list of fields to be updated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateMask;

  /**
   * Optional. If set to true, and the one-time product with the given package_name and product_id
   * doesn't exist, the one-time product will be created. If a new one-time product is created,
   * update_mask is ignored.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getAllowMissing() {
    return allowMissing;
  }

  /**
   * Optional. If set to true, and the one-time product with the given package_name and product_id
   * doesn't exist, the one-time product will be created. If a new one-time product is created,
   * update_mask is ignored.
   * @param allowMissing allowMissing or {@code null} for none
   */
  public UpdateOneTimeProductRequest setAllowMissing(java.lang.Boolean allowMissing) {
    this.allowMissing = allowMissing;
    return this;
  }

  /**
   * Optional. The latency tolerance for the propagation of this product upsert. Defaults to
   * latency-sensitive.
   * @return value or {@code null} for none
   */
  public java.lang.String getLatencyTolerance() {
    return latencyTolerance;
  }

  /**
   * Optional. The latency tolerance for the propagation of this product upsert. Defaults to
   * latency-sensitive.
   * @param latencyTolerance latencyTolerance or {@code null} for none
   */
  public UpdateOneTimeProductRequest setLatencyTolerance(java.lang.String latencyTolerance) {
    this.latencyTolerance = latencyTolerance;
    return this;
  }

  /**
   * Required. The one-time product to upsert.
   * @return value or {@code null} for none
   */
  public OneTimeProduct getOneTimeProduct() {
    return oneTimeProduct;
  }

  /**
   * Required. The one-time product to upsert.
   * @param oneTimeProduct oneTimeProduct or {@code null} for none
   */
  public UpdateOneTimeProductRequest setOneTimeProduct(OneTimeProduct oneTimeProduct) {
    this.oneTimeProduct = oneTimeProduct;
    return this;
  }

  /**
   * Required. The version of the available regions being used for the one-time product.
   * @return value or {@code null} for none
   */
  public RegionsVersion getRegionsVersion() {
    return regionsVersion;
  }

  /**
   * Required. The version of the available regions being used for the one-time product.
   * @param regionsVersion regionsVersion or {@code null} for none
   */
  public UpdateOneTimeProductRequest setRegionsVersion(RegionsVersion regionsVersion) {
    this.regionsVersion = regionsVersion;
    return this;
  }

  /**
   * Required. The list of fields to be updated.
   * @return value or {@code null} for none
   */
  public String getUpdateMask() {
    return updateMask;
  }

  /**
   * Required. The list of fields to be updated.
   * @param updateMask updateMask or {@code null} for none
   */
  public UpdateOneTimeProductRequest setUpdateMask(String updateMask) {
    this.updateMask = updateMask;
    return this;
  }

  @Override
  public UpdateOneTimeProductRequest set(String fieldName, Object value) {
    return (UpdateOneTimeProductRequest) super.set(fieldName, value);
  }

  @Override
  public UpdateOneTimeProductRequest clone() {
    return (UpdateOneTimeProductRequest) super.clone();
  }

}
